package com.example.hangzhou.welbeing.mytestdemoapp.designPatterns.AdapterModel.MyAdapter;

import com.example.hangzhou.welbeing.mytestdemoapp.designPatterns.AdapterModel.MyInter.MyAdvancedMediaPlayer;
import com.example.hangzhou.welbeing.mytestdemoapp.designPatterns.AdapterModel.MyInter.MyMediaPlayer;

/**
 * 杭州惟君医疗科技有限公司14
 * Created by 20433 on 2018/5/17
 *
 * @desc 东风山河绿，春已不折柳，繁花看不尽，处处惹人留
 * @desc 佛祖镇楼，bug辟容易
 */

public class MyMediaAdapter implements MyMediaPlayer {
    MyAdvancedMediaPlayer mMyAdvancedMediaPlayer ;
    public MyMediaAdapter(String type) {
        switch (type){
            case "mp4":
                mMyAdvancedMediaPlayer = new Mp4Player();
            case "vlc":
                mMyAdvancedMediaPlayer = new VlcPlayer();
        }
    }

    @Override
    public void play(String type, String filename) {
        switch (type){
            case "mp4":
                mMyAdvancedMediaPlayer.play01(filename);
            case "vlc":
                mMyAdvancedMediaPlayer.play02(filename);
        }
    }
}
